package com.himilco.ocana.workflow.core.bo;

import com.himilco.ocana.workflow.core.dao.AdminDAL;
import com.himilco.ocana.workflow.core.dao.entities.Ticket;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Stateless
public class AdminBO {

    @PersistenceContext(unitName = "PU_OCANA")
    EntityManager em;
    private AdminDAL adminDAL;

    public List<Ticket> findAllIncidents() {
        adminDAL = new AdminDAL(em);
        return adminDAL.findAll();
    }

    public AdminDAL getAdminDAL() {
        return adminDAL;
    }
}
